#ifndef __STORMWIDGET_STORMWIDGET_UILIBRARY_CDROPDOWNUI_DROPDOWNUI_H
#define __STORMWIDGET_STORMWIDGET_UILIBRARY_CDROPDOWNUI_DROPDOWNUI_H

#include "ContainerUI.h"
#include "IList.h"

class CControlUI;

class CDropDownUI:public CContainerUI,public IListOwnerUI
{
public:
	CDropDownUI(void);
	virtual ~CDropDownUI(void);
	LPCTSTR GetClass() const;
	LPVOID GetInterface(LPCTSTR pstrName);

	void Init();
	UINT GetControlFlags() const;

	CStdString GetText() const;

	SIZE GetDropDownSize() const;
	void SetDropDownSize(SIZE szDropBox);

	int GetCurSel() const;  
	bool SelectItem(int iIndex);

	bool Add(CControlUI* pControl);
	bool Remove(CControlUI* pControl);
	void RemoveAll();

	bool Activate();

	void SetPos(RECT rc);
	void Event(TEventUI& event);
	SIZE EstimateSize(SIZE szAvailable);
	void DoPaint(HDC hDC, const RECT& rcPaint);

protected:
	int m_iCurSel;
	int m_cxWidth;
	SIZE m_szDropBox;
	RECT m_rcButton;
	UINT m_uButtonState;
};
#endif //__STORMWIDGET_STORMWIDGET_UILIBRARY_CDROPDOWNUI_DROPDOWNUI_H
